export default (params) => {
	return new Promise((resolve, reject) => {
		
		uni.showLoading({
			title:''
		})
		
		const baseURL = 'http://localhost:3000'
		uni.request({
			...params,
			url: baseURL + params.url,
			success(res) {
				resolve(res.data)
			},
			fail(err) {
				reject(err)
			},
			complete() {
				uni.hideLoading()
			}
		})
	})
}